﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapContentExtension
{
    /// <summary>
    /// Eine Klasse die die Kartendaten hält.
    /// </summary>
    class MapData
    {
        /// <summary>
        /// Die Breite der Karte
        /// </summary>
        private int width;
        /// <summary>
        /// Macht die Breite der Karte zugänglich.
        /// </summary>
        public int Width
        {
            get { return width; }
        }

        /// <summary>
        /// Die Höhe der Karte
        /// </summary>
        private int height;
        /// <summary>
        /// Macht die Höhe der Karte zugänglich.
        /// </summary>
        public int Height
        {
            get { return height; }
        }

        /// <summary>
        /// Der Name der Tilesetdatei
        /// </summary>
        private string tileset;
        /// <summary>
        /// Macht den Namen der Tilesetdatei zugänglich.
        /// </summary>
        public string Tileset
        {
            get { return tileset; }
        }

        /// <summary>
        /// Die Layerdaten
        /// </summary>
        private short[][] data;
        /// <summary>
        /// Macht die Layerdaten zugänglich.
        /// </summary>
        public short[][] Data
        {
            get { return data; }
        }

        private Dictionary<String, int> nameToLayer;
        public Dictionary<String, int> NameToLayer
        {
            get { return nameToLayer; }
        }

        /// <summary>
        /// Erstellt ein neues Kartendatenobjekt.
        /// </summary>
        /// <param name="width">Breite der Karte</param>
        /// <param name="height">Höhe der Karte</param>
        /// <param name="tileset">Name der Tilesetdatei</param>
        /// <param name="data">Die Layerdaten</param>
        public MapData(int width, int height, string tileset, short[][] data, Dictionary<String, int> nameToLayer )
        {
            this.width = width;
            this.height = height;

            this.tileset = tileset;

            this.data = data;

            this.nameToLayer = nameToLayer;
        }
    }
}

